import 'package:mziot/app/data/scene_list_entity.dart';
import 'package:mziot/generated/json/base/json_convert_content.dart';

SceneListEntity $SceneListEntityFromJson(Map<String, dynamic> json) {
  final SceneListEntity sceneListEntity = SceneListEntity();
  final int? sceneId = jsonConvert.convert<int>(json['sceneId']);
  if (sceneId != null) {
    sceneListEntity.sceneId = sceneId;
  }
  final String? sceneName = jsonConvert.convert<String>(json['sceneName']);
  if (sceneName != null) {
    sceneListEntity.sceneName = sceneName;
  }
  final String? startTime = jsonConvert.convert<String>(json['startTime']);
  if (startTime != null) {
    sceneListEntity.startTime = startTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    sceneListEntity.endTime = endTime;
  }
  final bool? isLock = jsonConvert.convert<bool>(json['isLock']);
  if (isLock != null) {
    sceneListEntity.isLock = isLock;
  }
  final bool? sceneSwitch = jsonConvert.convert<bool>(json['sceneSwitch']);
  if (sceneSwitch != null) {
    sceneListEntity.sceneSwitch = sceneSwitch;
  }
  return sceneListEntity;
}

Map<String, dynamic> $SceneListEntityToJson(SceneListEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['sceneId'] = entity.sceneId;
  data['sceneName'] = entity.sceneName;
  data['startTime'] = entity.startTime;
  data['endTime'] = entity.endTime;
  data['isLock'] = entity.isLock;
  data['sceneSwitch'] = entity.sceneSwitch;
  return data;
}
